<!DOCTYPE html>
<html lang="en">
<?php
include_once("u_checkLogin.php");
include_once("u_getLoginInfo.php");
?>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="../public/pic/f.png" type="image/x-icon">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>信息·修改个人信息</title>
    <link rel="stylesheet" href="../public/css/bootstrap.min.css">
    <link rel="stylesheet" href="../public/css/user_public.css">
    <script src="../public/js/bootstrap.bundle.min.js"></script>
    <link rel="stylesheet" href="css/user_changeStyle.css">
    <script src="js/u_changeMyInfo.js"></script>
</head>

<body>
    <!-- 头部信息开始 -->
    <header>
        <nav class="nav-top">
            <!-- 网站logo -->
            <div class="logo">
                <img src="../public/pic/logo-h-w.png" alt="动物家宠物医院">
            </div>
            <!-- 登录者信息 -->
            <div class="user-info">
                <div class="user-info-con">
                    <span>现在时间：<span id="nowtime"></span></span>
                    <script src="../public/js/getnowtime.js"></script>
                    <br>
                    <span>当前登录：<name><?php echo $userName;?></name></span>
                </div>
                <a href="u_logout.php">点我退出</a>
            </div>
        </nav>
    </header>
    <!-- 头部信息结束 -->

    <!-- 主要内容开始 -->
    <main>
        <!-- 网页导航开始-->
        <nav>
            <ul class="nav nav-tabs nav-main">
                <li class="nav-item nav-main-item">
                    <a class="nav-link active" aria-current="page" href="user_changeMyInfo.php">个人信息</a>
                </li>
                <li class="nav-item nav-main-item">
                    <a class="nav-link" href="user_index.php">主页</a>
                </li>
                <li class="nav-item nav-main-item">
                    <a class="nav-link" href="user_nowOrder.php">预约服务</a>
                </li>
            </ul>
        </nav>
        <!-- 网页导航结束 -->
        <!-- 侧边导航栏开始 -->
        <div class="aside-navbar">
            <p>菜 单 栏</p>
            <ul>
                <a href="user_myinfo.php">
                    <li>个人信息</li>
                </a>
                <a href="user_petCases.php">
                    <li>宠物病例</li>
                </a>
                <a href="user_myPetinfo.php">
                    <li>我的宠物</li>
                </a>
                <a href="user_addPetinfo.php">
                    <li>添加宠物信息</li>
                </a>
                <a href="user_myMsg.php">
                    <li>我的留言</li>
                </a>
                <a href="user_changeMyInfo.php">
                    <li class="li-c">修改个人信息</li>
                </a>
                <a href="user_changePassword.php">
                    <li>修改登录密码</li>
                </a>
                <a href="user_delAccount.php">
                    <li>注销账号信息</li>
                </a>
            </ul>
        </div>
        <!-- 侧边导航栏结束 -->
        <!-- 主要内容开始 -->
        <div class="main-content">
            <p class="main-content-title">修 改 个 人 信 息</p>
            <div class="form-div">
                <form class="row g-3" action="u_changMyInfo.php" method="post">
                    <div class="col-md-7">
                        <label for="userID" class="form-label">用户ID</label>
                        <input type="text" class="form-control" id="userID" value="<?php echo $userID;?>" name="userID" readonly>
                    </div>
                    <div class="col-md-6">
                        <label for="userName" class="form-label">用户昵称</label>
                        <input type="text" class="form-control" id="userName" value="<?php echo $userName;?>" name="userName" onchange="checkName()">
                    </div>
                    <div class="col-md-8">
                        <label for="userPhone" class="form-label">默认联系方式</label>
                        <input type="text" class="form-control" id="userPhone" value="<?php echo $tel;?>" name="userPhone" onchange="checkPhone()">
                    </div>
                    <div class="col-12">
                        <button type="reset" class="btn btn-primary" onclick="resetForm()">重填</button>
                        <button type="submit" class="btn btn-primary" onclick="return checkForm()">提交修改</button>
                    </div>
                    <div class="tips">注意：用户ID暂不支持修改</div>
                </form>
            </div>
        </div>
        <!-- 主要内容结束 -->
    </main>
    <!-- 主要内容结束 -->
    <!-- 底部开始 -->
    <footer>
        <p>&copy; 2025 ANIMAL HOME PET HOSPITAL. All rights reserved.</p>
    </footer>
    <!-- 底部结束 -->
</body>

</html>